package com.house.model.doc;

import com.house.model.entity.House;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class HouseDoc {
    private String houseId;
    private String houseTitle;
    private String headImage;
    private float area;
    private int lentMoney;
    private int sell;
    private int states;
    private String address;
    private String addressName;
    private String orientation;
    private String location;

    public HouseDoc(){

    }

    public HouseDoc(House house){
        BeanUtils.copyProperties(house,this);
        this.location = house.getLatitude()+","+house.getLongitude();
    }
}
